<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::LogisticRegression&lt; InputVectorType &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_logistic_regression.html">LogisticRegression</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_logistic_regression-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::LogisticRegression&lt; InputVectorType &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__supervised__trainer.html">Supervised Trainers</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Trainer for Logistic regression.  
 <a href="classshark_1_1_logistic_regression.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_logistic_regression_8h_source.html">shark/Algorithms/Trainers/LogisticRegression.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::LogisticRegression&lt; InputVectorType &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_logistic_regression__inherit__graph.png" border="0" usemap="#ashark_1_1_logistic_regression_3_01_input_vector_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_logistic_regression_3_01_input_vector_type_01_4_inherit__map" id="ashark_1_1_logistic_regression_3_01_input_vector_type_01_4_inherit__map">
<area shape="rect" title="Trainer for Logistic regression." alt="" coords="258,39,430,79"/>
<area shape="rect" href="classshark_1_1_abstract_weighted_trainer.html" title="Superclass of weighted supervised learning algorithms." alt="" coords="5,5,210,46"/>
<area shape="poly" title=" " alt="" coords="226,40,258,44,257,49,225,45"/>
<area shape="rect" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters." alt="" coords="28,71,187,111"/>
<area shape="poly" title=" " alt="" coords="202,76,257,68,257,73,203,81"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a1d653feba69db50f94611dfba14f9d88" id="r_a1d653feba69db50f94611dfba14f9d88"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">base_type::ModelType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a1d653feba69db50f94611dfba14f9d88">ModelType</a></td></tr>
<tr class="separator:a1d653feba69db50f94611dfba14f9d88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4a9dfa85dc2e843c49e77d567a9a76d" id="r_ae4a9dfa85dc2e843c49e77d567a9a76d"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8c8370c0d2c2550a50df4d6b0bccf42b">base_type::DatasetType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#ae4a9dfa85dc2e843c49e77d567a9a76d">DatasetType</a></td></tr>
<tr class="separator:ae4a9dfa85dc2e843c49e77d567a9a76d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afec0e13e21ec6fd4b291a660f75c44b3" id="r_afec0e13e21ec6fd4b291a660f75c44b3"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ab6d74ebe9e01f9eefb70f9eb12738ffe">base_type::WeightedDatasetType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#afec0e13e21ec6fd4b291a660f75c44b3">WeightedDatasetType</a></td></tr>
<tr class="separator:afec0e13e21ec6fd4b291a660f75c44b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_weighted_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_weighted_trainer')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_weighted_trainer.html">shark::AbstractWeightedTrainer&lt; Model, LabelTypeT &gt;</a></td></tr>
<tr class="memitem:ad2ad0a52ecd9ac8677df6dbf403b68b4 inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_ad2ad0a52ecd9ac8677df6dbf403b68b4"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">base_type::ModelType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">ModelType</a></td></tr>
<tr class="separator:ad2ad0a52ecd9ac8677df6dbf403b68b4 inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11e51b154b87ed5e33b6ce2c830cd3d6 inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_a11e51b154b87ed5e33b6ce2c830cd3d6"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">base_type::InputType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a11e51b154b87ed5e33b6ce2c830cd3d6">InputType</a></td></tr>
<tr class="separator:a11e51b154b87ed5e33b6ce2c830cd3d6 inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cc4b95c06687c88b75ea8db8187336d inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_a8cc4b95c06687c88b75ea8db8187336d"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">base_type::LabelType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8cc4b95c06687c88b75ea8db8187336d">LabelType</a></td></tr>
<tr class="separator:a8cc4b95c06687c88b75ea8db8187336d inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c8370c0d2c2550a50df4d6b0bccf42b inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_a8c8370c0d2c2550a50df4d6b0bccf42b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">base_type::DatasetType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8c8370c0d2c2550a50df4d6b0bccf42b">DatasetType</a></td></tr>
<tr class="separator:a8c8370c0d2c2550a50df4d6b0bccf42b inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6d74ebe9e01f9eefb70f9eb12738ffe inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_ab6d74ebe9e01f9eefb70f9eb12738ffe"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_weighted_labeled_data.html">WeightedLabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a11e51b154b87ed5e33b6ce2c830cd3d6">InputType</a>, <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8cc4b95c06687c88b75ea8db8187336d">LabelType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ab6d74ebe9e01f9eefb70f9eb12738ffe">WeightedDatasetType</a></td></tr>
<tr class="separator:ab6d74ebe9e01f9eefb70f9eb12738ffe inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_trainer')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_trainer.html">shark::AbstractTrainer&lt; Model, LabelTypeT &gt;</a></td></tr>
<tr class="memitem:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0d5c9d35b614d6a33e4e8bfeaf1e9298"><td class="memItemLeft" align="right" valign="top">typedef Model&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">ModelType</a></td></tr>
<tr class="separator:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0cfa7cdd27b8bb162e64188095f8fa71"><td class="memItemLeft" align="right" valign="top">typedef ModelType::InputType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a></td></tr>
<tr class="separator:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4e344106831fb8227c2120681588ea9"><td class="memItemLeft" align="right" valign="top">typedef LabelTypeT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a></td></tr>
<tr class="separator:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4730fe9d59622d35d95cd4233f8d7af"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, <a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">DatasetType</a></td></tr>
<tr class="separator:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable" id="r_a2ad5e2e60b2b352988b41f46024d790b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="_c_svm_linear_8cpp.html#ab106d665148183a2dc94dcf8716c9203">VectorType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a2ad5e2e60b2b352988b41f46024d790b">ParameterVectorType</a></td></tr>
<tr class="separator:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a825243d1d1a808be12d822333c58f6fd" id="r_a825243d1d1a808be12d822333c58f6fd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a825243d1d1a808be12d822333c58f6fd">LogisticRegression</a> (double <a class="el" href="classshark_1_1_logistic_regression.html#a6608d0494e8d9cc32d6a1a14a9ddbd90">lambda1</a>=0, double <a class="el" href="classshark_1_1_logistic_regression.html#ab803c9232597463aa686b02434d3a15f">lambda2</a>=0, bool bias=true, double <a class="el" href="classshark_1_1_logistic_regression.html#a08948cf00fbe0ae3263449ca3f49ab36">accuracy</a>=1.e-8)</td></tr>
<tr class="memdesc:a825243d1d1a808be12d822333c58f6fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <br /></td></tr>
<tr class="separator:a825243d1d1a808be12d822333c58f6fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8513a39378376eb2155e52fd1ab504f4" id="r_a8513a39378376eb2155e52fd1ab504f4"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a8513a39378376eb2155e52fd1ab504f4">name</a> () const</td></tr>
<tr class="memdesc:a8513a39378376eb2155e52fd1ab504f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name.  <br /></td></tr>
<tr class="separator:a8513a39378376eb2155e52fd1ab504f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6608d0494e8d9cc32d6a1a14a9ddbd90" id="r_a6608d0494e8d9cc32d6a1a14a9ddbd90"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a6608d0494e8d9cc32d6a1a14a9ddbd90">lambda1</a> () const</td></tr>
<tr class="memdesc:a6608d0494e8d9cc32d6a1a14a9ddbd90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current setting of the l1-regularization parameter.  <br /></td></tr>
<tr class="separator:a6608d0494e8d9cc32d6a1a14a9ddbd90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab803c9232597463aa686b02434d3a15f" id="r_ab803c9232597463aa686b02434d3a15f"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#ab803c9232597463aa686b02434d3a15f">lambda2</a> () const</td></tr>
<tr class="memdesc:ab803c9232597463aa686b02434d3a15f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current setting of the l2-regularization parameter.  <br /></td></tr>
<tr class="separator:ab803c9232597463aa686b02434d3a15f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0cbcad123fdab3818c063388d4bd458" id="r_ad0cbcad123fdab3818c063388d4bd458"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#ad0cbcad123fdab3818c063388d4bd458">setLambda1</a> (double lambda)</td></tr>
<tr class="memdesc:ad0cbcad123fdab3818c063388d4bd458"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the l1-regularization parameter.  <br /></td></tr>
<tr class="separator:ad0cbcad123fdab3818c063388d4bd458"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c836fe21f4db962f7f50350ad90e4e0" id="r_a9c836fe21f4db962f7f50350ad90e4e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a9c836fe21f4db962f7f50350ad90e4e0">setLambda2</a> (double lambda)</td></tr>
<tr class="memdesc:a9c836fe21f4db962f7f50350ad90e4e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the l2-regularization parameter.  <br /></td></tr>
<tr class="separator:a9c836fe21f4db962f7f50350ad90e4e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08948cf00fbe0ae3263449ca3f49ab36" id="r_a08948cf00fbe0ae3263449ca3f49ab36"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a08948cf00fbe0ae3263449ca3f49ab36">accuracy</a> () const</td></tr>
<tr class="memdesc:a08948cf00fbe0ae3263449ca3f49ab36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current setting of the accuracy (maximal gradient component of the optimization problem).  <br /></td></tr>
<tr class="separator:a08948cf00fbe0ae3263449ca3f49ab36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e792090a1db8d5eb4503e10bba38872" id="r_a5e792090a1db8d5eb4503e10bba38872"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a5e792090a1db8d5eb4503e10bba38872">setAccuracy</a> (double <a class="el" href="classshark_1_1_logistic_regression.html#a08948cf00fbe0ae3263449ca3f49ab36">accuracy</a>)</td></tr>
<tr class="memdesc:a5e792090a1db8d5eb4503e10bba38872"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the accuracy (maximal gradient component of the optimization problem).  <br /></td></tr>
<tr class="separator:a5e792090a1db8d5eb4503e10bba38872"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c601e09b06f3b464fdc978f9d40493" id="r_a45c601e09b06f3b464fdc978f9d40493"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a45c601e09b06f3b464fdc978f9d40493">parameterVector</a> () const</td></tr>
<tr class="memdesc:a45c601e09b06f3b464fdc978f9d40493"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the regularization parameters lambda1 and lambda2 through the <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> interface.  <br /></td></tr>
<tr class="separator:a45c601e09b06f3b464fdc978f9d40493"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99b7a94494a7544b82164c70152f7434" id="r_a99b7a94494a7544b82164c70152f7434"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a99b7a94494a7544b82164c70152f7434">setParameterVector</a> (RealVector const &amp;param)</td></tr>
<tr class="memdesc:a99b7a94494a7544b82164c70152f7434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the regularization parameters lambda1 and lambda2 through the <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> interface.  <br /></td></tr>
<tr class="separator:a99b7a94494a7544b82164c70152f7434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a119f9feb4a345c46e04fd1aad0875cd1" id="r_a119f9feb4a345c46e04fd1aad0875cd1"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a119f9feb4a345c46e04fd1aad0875cd1">numberOfParameters</a> () const</td></tr>
<tr class="memdesc:a119f9feb4a345c46e04fd1aad0875cd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of parameters (one in this case).  <br /></td></tr>
<tr class="separator:a119f9feb4a345c46e04fd1aad0875cd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7301dbc776c3f6027c95817439dbd66" id="r_ad7301dbc776c3f6027c95817439dbd66"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#ad7301dbc776c3f6027c95817439dbd66">train</a> (<a class="el" href="classshark_1_1_logistic_regression.html#a1d653feba69db50f94611dfba14f9d88">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_logistic_regression.html#ae4a9dfa85dc2e843c49e77d567a9a76d">DatasetType</a> const &amp;dataset)</td></tr>
<tr class="memdesc:ad7301dbc776c3f6027c95817439dbd66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Train a linear model with logistic regression.  <br /></td></tr>
<tr class="separator:ad7301dbc776c3f6027c95817439dbd66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e8dd39f9b5bf73301079f9d441a2b53" id="r_a9e8dd39f9b5bf73301079f9d441a2b53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_logistic_regression.html#a9e8dd39f9b5bf73301079f9d441a2b53">train</a> (<a class="el" href="classshark_1_1_logistic_regression.html#a1d653feba69db50f94611dfba14f9d88">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_logistic_regression.html#afec0e13e21ec6fd4b291a660f75c44b3">WeightedDatasetType</a> const &amp;dataset)</td></tr>
<tr class="memdesc:a9e8dd39f9b5bf73301079f9d441a2b53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Train a linear model with logistic regression using weights.  <br /></td></tr>
<tr class="separator:a9e8dd39f9b5bf73301079f9d441a2b53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_weighted_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_weighted_trainer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_weighted_trainer.html">shark::AbstractWeightedTrainer&lt; Model, LabelTypeT &gt;</a></td></tr>
<tr class="memitem:ad35ae0b236c45b73f749285a54288e89 inherit pub_methods_classshark_1_1_abstract_weighted_trainer" id="r_ad35ae0b236c45b73f749285a54288e89"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad35ae0b236c45b73f749285a54288e89">train</a> (<a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ab6d74ebe9e01f9eefb70f9eb12738ffe">WeightedDatasetType</a> const &amp;dataset)=0</td></tr>
<tr class="memdesc:ad35ae0b236c45b73f749285a54288e89 inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the algorithm and trains a model on the given weighted data.  <br /></td></tr>
<tr class="separator:ad35ae0b236c45b73f749285a54288e89 inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e5711480e4f1e214ff3c30a9604d10a inherit pub_methods_classshark_1_1_abstract_weighted_trainer" id="r_a9e5711480e4f1e214ff3c30a9604d10a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a9e5711480e4f1e214ff3c30a9604d10a">train</a> (<a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8c8370c0d2c2550a50df4d6b0bccf42b">DatasetType</a> const &amp;dataset)</td></tr>
<tr class="memdesc:a9e5711480e4f1e214ff3c30a9604d10a inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the algorithm and trains a model on the given unweighted data.  <br /></td></tr>
<tr class="separator:a9e5711480e4f1e214ff3c30a9604d10a inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_nameable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_nameable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_nameable.html">shark::INameable</a></td></tr>
<tr class="memitem:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable" id="r_a877dbdfc6b58ea836495143cea44a98c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_nameable.html#a877dbdfc6b58ea836495143cea44a98c">~INameable</a> ()</td></tr>
<tr class="separator:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_serializable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_serializable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_serializable.html">shark::ISerializable</a></td></tr>
<tr class="memitem:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable" id="r_a7baa9ce108d7278822297ce15882782a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a7baa9ce108d7278822297ce15882782a">~ISerializable</a> ()</td></tr>
<tr class="memdesc:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual d'tor.  <br /></td></tr>
<tr class="separator:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable" id="r_ad4ad9a7c274deff642f91e98417fbc63"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#ad4ad9a7c274deff642f91e98417fbc63">read</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive)</td></tr>
<tr class="memdesc:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the component from the supplied archive.  <br /></td></tr>
<tr class="separator:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable" id="r_a9bddedd42933c922e323b73131f62f12"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a9bddedd42933c922e323b73131f62f12">write</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive) const</td></tr>
<tr class="memdesc:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the component to the supplied archive.  <br /></td></tr>
<tr class="separator:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable" id="r_abdda0c5b8e065b8afbac2cba8f58e841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#abdda0c5b8e065b8afbac2cba8f58e841">load</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive, unsigned int version)</td></tr>
<tr class="memdesc:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned loading of components, calls read(...).  <br /></td></tr>
<tr class="separator:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable" id="r_a5bf66fa8db15cc529bec98976a2f5255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a5bf66fa8db15cc529bec98976a2f5255">save</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive, unsigned int version) const</td></tr>
<tr class="memdesc:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned storing of components, calls write(...).  <br /></td></tr>
<tr class="separator:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable" id="r_a4560a94e8f4908fe8627e41e7d965735"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a4560a94e8f4908fe8627e41e7d965735">BOOST_SERIALIZATION_SPLIT_MEMBER</a> ()</td></tr>
<tr class="separator:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable" id="r_a9e3a11172e74d1aa7292f3de4e2b6ebc"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a9e3a11172e74d1aa7292f3de4e2b6ebc">~IParameterizable</a> ()</td></tr>
<tr class="separator:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class InputVectorType = RealVector&gt;<br />
class shark::LogisticRegression&lt; InputVectorType &gt;</div><p>Trainer for Logistic regression. </p>
<p>Logistic regression solves the following optimization problem: </p><p class="formulaDsp">
\[ \min_{w,b} \sum_i u_i l(y_i,f(x_i^Tw+b)) +\lambda_1 |w|_1 +\lambda_2 |w|^2_2 \]
</p>
<p> Where \(l\) is the cross-entropy loss and \(u_i\) are individual weuights for each point(assumed to be 1). Logistic regression is one of the most well known machine learning algorithms for classification using linear models.</p>
<p>The solver is based on <a class="el" href="classshark_1_1_l_b_f_g_s.html" title="Limited-Memory Broyden, Fletcher, Goldfarb, Shannon algorithm.">LBFGS</a> for the case where no l1-regularization is used. Otherwise the problem is transformed into a constrained problem and the constrined-LBFGS algorithm is used. This is one of the most efficient solvers for logistic regression as long as the number of data points is not too large. </p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00059">59</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="ae4a9dfa85dc2e843c49e77d567a9a76d" name="ae4a9dfa85dc2e843c49e77d567a9a76d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4a9dfa85dc2e843c49e77d567a9a76d">&#9670;&#160;</a></span>DatasetType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8c8370c0d2c2550a50df4d6b0bccf42b">base_type::DatasetType</a> <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::DatasetType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00065">65</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

</div>
</div>
<a id="a1d653feba69db50f94611dfba14f9d88" name="a1d653feba69db50f94611dfba14f9d88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d653feba69db50f94611dfba14f9d88">&#9670;&#160;</a></span>ModelType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">base_type::ModelType</a> <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::ModelType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00064">64</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

</div>
</div>
<a id="afec0e13e21ec6fd4b291a660f75c44b3" name="afec0e13e21ec6fd4b291a660f75c44b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afec0e13e21ec6fd4b291a660f75c44b3">&#9670;&#160;</a></span>WeightedDatasetType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ab6d74ebe9e01f9eefb70f9eb12738ffe">base_type::WeightedDatasetType</a> <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::WeightedDatasetType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00066">66</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a825243d1d1a808be12d822333c58f6fd" name="a825243d1d1a808be12d822333c58f6fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a825243d1d1a808be12d822333c58f6fd">&#9670;&#160;</a></span>LogisticRegression()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::LogisticRegression </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lambda1</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lambda2</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bias</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>accuracy</em> = <code>1.e-8</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lambda1</td><td>value of the 1-norm regularization parameter (see class description) </td></tr>
    <tr><td class="paramname">lambda2</td><td>value of the 2-norm regularization parameter (see class description) </td></tr>
    <tr><td class="paramname">bias</td><td>whether to train with bias or not </td></tr>
    <tr><td class="paramname">accuracy</td><td>stopping criterion for the iterative solver, maximal gradient component of the objective function (see class description) </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00074">74</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_logistic_regression.html#a08948cf00fbe0ae3263449ca3f49ab36">shark::LogisticRegression&lt; InputVectorType &gt;::accuracy()</a>, <a class="el" href="classshark_1_1_logistic_regression.html#a6608d0494e8d9cc32d6a1a14a9ddbd90">shark::LogisticRegression&lt; InputVectorType &gt;::lambda1()</a>, <a class="el" href="classshark_1_1_logistic_regression.html#ab803c9232597463aa686b02434d3a15f">shark::LogisticRegression&lt; InputVectorType &gt;::lambda2()</a>, <a class="el" href="classshark_1_1_logistic_regression.html#a5e792090a1db8d5eb4503e10bba38872">shark::LogisticRegression&lt; InputVectorType &gt;::setAccuracy()</a>, <a class="el" href="classshark_1_1_logistic_regression.html#ad0cbcad123fdab3818c063388d4bd458">shark::LogisticRegression&lt; InputVectorType &gt;::setLambda1()</a>, and <a class="el" href="classshark_1_1_logistic_regression.html#a9c836fe21f4db962f7f50350ad90e4e0">shark::LogisticRegression&lt; InputVectorType &gt;::setLambda2()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a08948cf00fbe0ae3263449ca3f49ab36" name="a08948cf00fbe0ae3263449ca3f49ab36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08948cf00fbe0ae3263449ca3f49ab36">&#9670;&#160;</a></span>accuracy()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::accuracy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the current setting of the accuracy (maximal gradient component of the optimization problem). </p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00108">108</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_logistic_regression.html#a825243d1d1a808be12d822333c58f6fd">shark::LogisticRegression&lt; InputVectorType &gt;::LogisticRegression()</a>, and <a class="el" href="classshark_1_1_logistic_regression.html#a5e792090a1db8d5eb4503e10bba38872">shark::LogisticRegression&lt; InputVectorType &gt;::setAccuracy()</a>.</p>

</div>
</div>
<a id="a6608d0494e8d9cc32d6a1a14a9ddbd90" name="a6608d0494e8d9cc32d6a1a14a9ddbd90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6608d0494e8d9cc32d6a1a14a9ddbd90">&#9670;&#160;</a></span>lambda1()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::lambda1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the current setting of the l1-regularization parameter. </p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00087">87</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_logistic_regression.html#a825243d1d1a808be12d822333c58f6fd">shark::LogisticRegression&lt; InputVectorType &gt;::LogisticRegression()</a>.</p>

</div>
</div>
<a id="ab803c9232597463aa686b02434d3a15f" name="ab803c9232597463aa686b02434d3a15f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab803c9232597463aa686b02434d3a15f">&#9670;&#160;</a></span>lambda2()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::lambda2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the current setting of the l2-regularization parameter. </p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00092">92</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_logistic_regression.html#a825243d1d1a808be12d822333c58f6fd">shark::LogisticRegression&lt; InputVectorType &gt;::LogisticRegression()</a>.</p>

</div>
</div>
<a id="a8513a39378376eb2155e52fd1ab504f4" name="a8513a39378376eb2155e52fd1ab504f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8513a39378376eb2155e52fd1ab504f4">&#9670;&#160;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_nameable.html#a9893f99314de30cd472e649c235d0db4">shark::INameable</a>.</p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00082">82</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

</div>
</div>
<a id="a119f9feb4a345c46e04fd1aad0875cd1" name="a119f9feb4a345c46e04fd1aad0875cd1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a119f9feb4a345c46e04fd1aad0875cd1">&#9670;&#160;</a></span>numberOfParameters()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::numberOfParameters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the number of parameters (one in this case). </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#aed1e8d1d4dbde387e2f6a25141ed3a20">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00131">131</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

</div>
</div>
<a id="a45c601e09b06f3b464fdc978f9d40493" name="a45c601e09b06f3b464fdc978f9d40493"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45c601e09b06f3b464fdc978f9d40493">&#9670;&#160;</a></span>parameterVector()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::parameterVector </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the regularization parameters lambda1 and lambda2 through the <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> interface. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#afaa2ba692ab64a0edbff60d7ee6794db">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00119">119</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

</div>
</div>
<a id="a5e792090a1db8d5eb4503e10bba38872" name="a5e792090a1db8d5eb4503e10bba38872"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e792090a1db8d5eb4503e10bba38872">&#9670;&#160;</a></span>setAccuracy()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::setAccuracy </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>accuracy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the accuracy (maximal gradient component of the optimization problem). </p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00113">113</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_logistic_regression.html#a08948cf00fbe0ae3263449ca3f49ab36">shark::LogisticRegression&lt; InputVectorType &gt;::accuracy()</a>, and <a class="el" href="_exception_8h.html#adce1f80097c69010f5eab2618fa2e971">SHARK_RUNTIME_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_logistic_regression.html#a825243d1d1a808be12d822333c58f6fd">shark::LogisticRegression&lt; InputVectorType &gt;::LogisticRegression()</a>.</p>

</div>
</div>
<a id="ad0cbcad123fdab3818c063388d4bd458" name="ad0cbcad123fdab3818c063388d4bd458"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0cbcad123fdab3818c063388d4bd458">&#9670;&#160;</a></span>setLambda1()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::setLambda1 </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lambda</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the l1-regularization parameter. </p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00097">97</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">References <a class="el" href="_exception_8h.html#adce1f80097c69010f5eab2618fa2e971">SHARK_RUNTIME_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_logistic_regression.html#a825243d1d1a808be12d822333c58f6fd">shark::LogisticRegression&lt; InputVectorType &gt;::LogisticRegression()</a>, and <a class="el" href="classshark_1_1_logistic_regression.html#a99b7a94494a7544b82164c70152f7434">shark::LogisticRegression&lt; InputVectorType &gt;::setParameterVector()</a>.</p>

</div>
</div>
<a id="a9c836fe21f4db962f7f50350ad90e4e0" name="a9c836fe21f4db962f7f50350ad90e4e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c836fe21f4db962f7f50350ad90e4e0">&#9670;&#160;</a></span>setLambda2()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::setLambda2 </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lambda</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the l2-regularization parameter. </p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00103">103</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">References <a class="el" href="_exception_8h.html#adce1f80097c69010f5eab2618fa2e971">SHARK_RUNTIME_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_logistic_regression.html#a825243d1d1a808be12d822333c58f6fd">shark::LogisticRegression&lt; InputVectorType &gt;::LogisticRegression()</a>, and <a class="el" href="classshark_1_1_logistic_regression.html#a99b7a94494a7544b82164c70152f7434">shark::LogisticRegression&lt; InputVectorType &gt;::setParameterVector()</a>.</p>

</div>
</div>
<a id="a99b7a94494a7544b82164c70152f7434" name="a99b7a94494a7544b82164c70152f7434"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99b7a94494a7544b82164c70152f7434">&#9670;&#160;</a></span>setParameterVector()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::setParameterVector </td>
          <td>(</td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>param</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the regularization parameters lambda1 and lambda2 through the <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> interface. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#ad5e35d1a10ff36fa72ea787baa40e9ad">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_logistic_regression_8h_source.html#l00124">124</a> of file <a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_logistic_regression.html#ad0cbcad123fdab3818c063388d4bd458">shark::LogisticRegression&lt; InputVectorType &gt;::setLambda1()</a>, <a class="el" href="classshark_1_1_logistic_regression.html#a9c836fe21f4db962f7f50350ad90e4e0">shark::LogisticRegression&lt; InputVectorType &gt;::setLambda2()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="ad7301dbc776c3f6027c95817439dbd66" name="ad7301dbc776c3f6027c95817439dbd66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7301dbc776c3f6027c95817439dbd66">&#9670;&#160;</a></span>train() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::train </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_logistic_regression.html#a1d653feba69db50f94611dfba14f9d88">ModelType</a> &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_logistic_regression.html#ae4a9dfa85dc2e843c49e77d567a9a76d">DatasetType</a> const &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Train a linear model with logistic regression. </p>

</div>
</div>
<a id="a9e8dd39f9b5bf73301079f9d441a2b53" name="a9e8dd39f9b5bf73301079f9d441a2b53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e8dd39f9b5bf73301079f9d441a2b53">&#9670;&#160;</a></span>train() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputVectorType  = RealVector&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_logistic_regression.html">shark::LogisticRegression</a>&lt; InputVectorType &gt;::train </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_logistic_regression.html#a1d653feba69db50f94611dfba14f9d88">ModelType</a> &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_logistic_regression.html#afec0e13e21ec6fd4b291a660f75c44b3">WeightedDatasetType</a> const &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Train a linear model with logistic regression using weights. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/Trainers/<a class="el" href="_logistic_regression_8h_source.html">LogisticRegression.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
